﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SeniorObject
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Student s1= new Student();
            s1.age = 18;
            s1.name = "张三";
            s1.id = 001;

            Student s2 = new Student();
            s2.age = 18;
            s2.name = "张三";
            s2.id = 001;

            //数据的拆箱和装箱
            //1.装箱源数据还保留在栈当中
            //2.但是在保存的过程中，堆中也存放了一个object类型的数据，但是是拷贝的数据
            //3.拆箱过程是拷贝堆数据，放置于栈内存
            int i = 123;
            object o = i;
            int j = (int)o;

            Student s = new Student();
            Object[] objects = {2,"hello",2.5,s};
            Console.WriteLine(s1.ToString());
            Student.Show();
            Console.WriteLine(s1.Equals(s2));
            Console.ReadLine();
        }
    }
}
